import request from '@/utils/request';

const dictApi = {};

dictApi.listByKey = (key) => {
	return request({
		url: '/auth-api/dict/list-key/' + key,
		method: 'get',
	})
}
dictApi.list = () => {
	return request({
		url: '/auth-api/dict/list',
		method: 'get',
	})
}
dictApi.page = (params) => {
	return request({
		url: '/auth-api/dict/page',
		method: 'get',
		params: params,
	})
}
dictApi.add = (params) => {
	return request({
		url: '/auth-api/dict',
		method: 'post',
		data: params,
	})
}
dictApi.update = (params) => {
	return request({
		url: '/auth-api/dict',
		method: 'put',
		data: params,
	})
}
dictApi.get = (id) => {
	return request({
		url: '/auth-api/dict/' + id,
		method: 'get',
	})
}
dictApi.delete = (id) => {
	return request({
		url: '/auth-api/dict/' + id,
		method: 'delete',
	})
}


export default dictApi